package cn.ycl.system.other.study.designMode;

/**
 * @author YuanChangLiang
 * @description 使用嵌套类（静态内部类创建单例）
 * @date created in 13:53 2021/7/1
 */


public class Food {
    private Food(){}

    public static class Holder{
        public static Food food = new Food();
    }
    public Food getInstance(){
        return Holder.food;
    }
}
